//
//  FoodFetcher.h
//  Meal Wheel
//
//  Created by Justin Dell on 6/29/08.
//  Copyright 2008 . All rights reserved.
//

/* 
Fetches data from the XMLParser as well as the FoodTree structure 
    to be used in most other classes
Also is called by the randomizing buttons 
*/

#import <Cocoa/Cocoa.h>
#include <string>
#include <vector>
#include "FoodTree.h"
#include "XMLParse.h"
using namespace std;


@interface FoodFetcher : NSObject {
}

// Returns a random name of a food
-(NSString *)getFood;

// Returns a random name of a specific type
-(NSString *)getSpecificFood:(const char *) type;

// Returns a food object with the given name
-(Food *)getFoodByName:(const char *)name;

// Returns all the types the given food has
-(vector<string>)getFoodTypes:(const char *)foodName;

// Initializes the food list, arg is the path to the executable
-(void)initList:(char *)arg;

// Adds a food to the list given a name and vector of types
-(void)addFood:(string)name addType:(vector<string>)type;

// Removes a food from the list given its name
-(void)removeFood:(string)name;

// Writes the food list to the xml file, overwriting the old one
-(void)writeToFile;

// Returns an array of all the food names
-(NSMutableArray *)getAllFoods;

@end
